<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>管理首页</title>
<meta name="description" content="这是一个 首页面">
<meta name="keywords" content="index">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<style>

</style>

<jsp:include page="../inc2.jsp"></jsp:include>

<!-- 异步上传图片 -->
<body style="background:#fff;">
  <!-- content start -->
  <div class="admin-content">
	
    
<!-- 条件检索开始 -->
	<div class="am-g" style="background:#fff;padding:15px 0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;" data-am-sticky="{animation: 'slide-top'}">
      <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
      
        <div class="am-btn-toolbar">
        	<form id="form-search" >
        	<input type="hidden" id="cityName" name="cityName" value="${param.cityName}">
			
            <span style="font-size:14px">名称</span> <input type="text" name="name" style="margin-right:15px"/>
            <span style="font-size:14px">联系人</span> <input type="text" name="contacts" style="margin-right:15px"/>
            <span style="font-size:14px">地址</span> <input type="text" name="addr" style="margin-right:15px"/>
            <div class="timediv">
                <input type="text" placeholder="2015-11-15 20:30" readonly name="startDate" id="starttime" onClick="timeshow()"> -
                <input type="text" placeholder="2015-11-15 20:30" readonly name="endDate" style="margin-right:22px" id="endtime" onClick="timeshow()">
                <i class="am-icon-calendar" onClick="timeshow()"></i>
            </div>
          
            <button class="am-btn am-btn-sm am-btn-primary am-radius" type="button" onClick="query();" style="padding:5px 8px;margin-left:25px">查找</button>
           </form>
        </div>
      </div>
    </div>
<!-- 条件检索结束 -->
      <div class="am-u-sm-12">
          <div class="am-u-sm-12 am-u-md-12 am-u-lg-12 tablemenu">
				<div id="dtGridContainer_2_1_2" class="dt-grid-container"></div>
				<div id="dtGridToolBarContainer_2_1_2" class="dt-grid-toolbar-container"></div>
          </div>
          <!--end-->
    </div>
    <div class="am-margin am-text-right am-u-sm-11">
<!--                       <button type="button" class="am-btn am-btn-primary am-btn-xs"  onclick = "yulan();">预览</button> -->
<!--                       <button type="button" class="am-btn am-btn-primary am-btn-xs"  onclick = "submitForm();">保存</button> -->
                      <button type="button" class="am-btn am-btn-primary am-btn-xs" onClick="closemodal()">取消</button>
          </div>
  </div>
  <!-- content end -->
</div>
  
<script>
	var dtGridOption_2_1_2 = {
		lang : 'zh-cn',
		ajaxLoad : true,
		loadURL : '${pageContext.request.contextPath}/distributor/showdistributorGrid.action',
		exportFileName : '用户列表',
		columns : [ {
						id : 'id',
						title : 'id',
						hide :true

					}, {
						id : 'name',
						title : '名称'
					},
					{
						id : 'cityName',
						title : '城市'
					},{
						id : 'mainPro',
						title : '主营商品'
					},
					 {
						id : 'contacts',
						title : '联系人'
					}, {
						id : 'phone',
						title : '联系电话'
					}, {
						id : 'addr',
						title : '地址'
					}, {
						id : 'account',
						title : '银行账号',
						hide:true
					}, {
						id : 'state',
						title : '状态',
						resolution: function(value,row,index){
							if (value==0){
								return "<font style='color:red'>未审核</font>";
							} else if(value==1){
								return "<font style='color:green'>审核通过</font>";
							}else if(value==2){
								return "<font style='color:#6F6F6F'>已退回</font>";
							}
						}
					}, 
				{
					id : 'isOpen',
					title : '营业',
					width :	10,
					sortable : true,
					resolution: function(value,row,index){
					if (value==0){
						return "<font style='color:red'>未营业</font>";
					} else {
						return "<font style='color:green'>营业</font>";
					}
				}
				}, {
						id : 'createTime',
						title : '注册时间'
					}],
		gridContainer : 'dtGridContainer_2_1_2',
		toolbarContainer : 'dtGridToolBarContainer_2_1_2',
		tools : '',
		pageSize : 10,
		pageSizeLimit : [10, 20, 50]
	};
	var grid_2_1_2 = $.fn.DtGrid.init(dtGridOption_2_1_2);
	$(function(){
		query();
	});
	
	//条件查询
	function query()
	{	//传入实例化好的dt-grid 如grid_2_1_9和条件筛选的form的id
		//如果有其他固定的筛选条件，请在条件筛选的form中放入隐藏域
		dtGridLoad(grid_2_1_2, "form-search"); 
	}
	
	//点击放弃  关闭
	function closemodal(){
		$('#doc-modal-1,#foam-zcc', parent.document).hide();
	}
</script>         
</body>

</html>
